﻿<html>  
<head></head>  
<script type="text/javascript">  
    function Person(){  
        this.test1=function (){  
            if(arguments.length==1){  
                this.show1(arguments[0]);  
            }else if(arguments.length==2){  
                this.show2(arguments[0],arguments[1]);  
            }else if(arguments.length==3){  
                this.show3(arguments[0],arguments[1],arguments[2]);  
            }  
        }  
        this.show1=function(a){  
            console.log("show1()被调用");  
        }  
        this.show2=function(a,b){  
            console.log("show2()被调用");  
        }  
        this.show3=function(a,b,c){  
            console.log("show3()被调用");  
        }  
    }  
    var p1=new Person();    
	p1.test1("a","b","c");  
    p1.test1("a","b");  
    p1.test1("a");  
</script>  
</html>  